package org.jeecgframework.web.material.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**   
 * @Description: 产品生产周期
 * @date 2015-08-19 09:52:16
 * @version V1.0   
 *
 */
@Entity
@Table(name = "product_progress", schema = "")
@SuppressWarnings("serial")
public class ProductProgressEntity implements java.io.Serializable {
	//id
	private java.lang.String id;
	//产品ID
	private CompanyEntity companyId;
	//产品ID
	private PProductEntity productId;
	//产品分类
	private  PTypeEntity typeId;
	//标识是PRODUCT_ID还是TYPE_ID
	private java.lang.String flag;
	//产品周期名称
	private java.lang.String periodName;
	//产品周期时间
	private java.lang.String periodTime;
	//备注
	private java.lang.String remark;
	//顺序
	private java.lang.Integer periodOrder;
	//产品生成过程
	private List<ProductProgressEntity> progressList = new ArrayList<ProductProgressEntity>();
	@Transient
	public List<ProductProgressEntity> getProgressList() {
		return progressList;
	}
	public void setProgressList(List<ProductProgressEntity> progressList) {
		this.progressList = progressList;
	}

	/**
	 *get方法: 取得id
	 */
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=32)
	public java.lang.String getId(){
		return this.id;
	}

	/**
	 *set方法: 设置id
	 */
	public void setId(java.lang.String id){
		this.id = id;
	}
	
	/**
	 * @return the companyId
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name ="COMPANY_ID")
	public CompanyEntity getCompanyId() {
		return companyId;
	}
	/**
	 * @param companyId the companyId to set
	 */
	public void setCompanyId(CompanyEntity companyId) {
		this.companyId = companyId;
	}
	/**
	 *get方法: 取得产品ID
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name ="PRODUCT_ID")
	public PProductEntity getProductId(){
		return this.productId;
	}

	/**
	 *set方法: 设置产品ID
	 */
	public void setProductId(PProductEntity productId){
		this.productId = productId;
	}
	
	/**
	 * @return the typeId
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name ="TYPE_ID")
	public PTypeEntity getTypeId() {
		return typeId;
	}

	/**
	 * @param typeId the typeId to set
	 */
	public void setTypeId(PTypeEntity typeId) {
		this.typeId = typeId;
	}

	/**
	 * @return the flag
	 */
	@Column(name ="FLAG")
	public java.lang.String getFlag() {
		return flag;
	}
	/**
	 * @param flag the flag to set
	 */
	public void setFlag(java.lang.String flag) {
		this.flag = flag;
	}
	

	/**
	 *get方法: 取得产品周期名称
	 */
	@Column(name ="PERIOD_NAME",nullable=true,length=45)
	public java.lang.String getPeriodName(){
		return this.periodName;
	}
	
	/**
	 *set方法: 设置产品周期名称
	 */
	public void setPeriodName(java.lang.String periodName){
		this.periodName = periodName;
	}
	/**
	 *get方法: 取得产品周期时间
	 */
	@Column(name ="PERIOD_TIME",nullable=true,length=45)
	public java.lang.String getPeriodTime(){
		return this.periodTime;
	}

	/**
	 *set方法: 设置产品周期时间
	 */
	public void setPeriodTime(java.lang.String periodTime){
		this.periodTime = periodTime;
	}
	/**
	 *get方法: 取得备注
	 */
	@Column(name ="REMARK",nullable=true,length=45)
	public java.lang.String getRemark(){
		return this.remark;
	}

	/**
	 *set方法: 设置备注
	 */
	public void setRemark(java.lang.String remark){
		this.remark = remark;
	}
	/**
	 *get方法: 取得顺序
	 */
	@Column(name ="PERIOD_ORDER",nullable=false,length=10)
	public java.lang.Integer getPeriodOrder(){
		return this.periodOrder;
	}

	/**
	 *set方法: 设置顺序
	 */
	public void setPeriodOrder(java.lang.Integer periodOrder){
		this.periodOrder = periodOrder;
	}
}
